using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace XGame.UI
{

    public enum UIPlaneLayer
    {
        Default = 0,
        Main = 1,
        Message = 2
    }



    public class UIManager : Manager
    {
        static private UIManager m_Instance;

        static public UIManager GetInstance()
        {
            if(m_Instance == null)
            {
                m_Instance = new UIManager();
                m_Instance.OnInit();
            }
            return m_Instance;
        }

        private GameObject m_UIRoot;
        private Camera m_UICamera;


        public override void OnInit()
        {


        }

        public void CreateUIRootNode()
        {
            GameObject uiRootTemplate = Resources.Load<GameObject>("UIRoot");
            m_UIRoot = GameObject.Instantiate(uiRootTemplate, Vector3.zero, Quaternion.identity);
            m_UIRoot.name = "UIRoot";
            GameObject.DontDestroyOnLoad(m_UIRoot);
            m_UICamera = m_UIRoot.GetComponentInChildren<Camera>();
        }


        public override void OnTick(float delta)
        {

        }

        public override void OnDestroy()
        {

        }
    }
}

